package gr.handmademarket.po.interfaces;

import java.io.Serializable;
import java.util.Set;

/**
 * implemented by product categories and creators.
 */
public interface Category 
extends Serializable{

	/**
	 * 
	 * @return the code
	 */
	int getCode();
	
	/**
	 * sets the code
	 * @param code
	 */
	void setCode(int code);
	
	/**
	 * 
	 * @return name
	 */
	String getName();
	
	/**
	 * sets the name
	 * @param name
	 */
	void setName(String name);
	
	/**
	 *  
	 * @return true if is is leaf.
	 */
	boolean isLeaf();
	
	/**
	 *  
	 * @return true if is is root.
	 */
	boolean isRoot();
	
	/**
	 * sets the parent category.
	 * @param parent
	 */
	void setParent(Category parent);
	
	/**
	 * returns the parent category.
	 * @return the parent category.
	 */
	Category getParent();
	
	/**
	 * 
	 * @return the children categories.
	 */
	Set<Category> getChildren();
	
}
